package br.edu.fanor.esfinge.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="timeline")
public class Timeline implements Serializable{

	private static final long serialVersionUID = 3317776153186316478L;
	
	@Id
	@SequenceGenerator(name = "seq_evento", sequenceName="seq_evento", allocationSize=1)
	@GeneratedValue(generator="seq_evento", strategy=GenerationType.SEQUENCE)
	@Column(name="evento_id", nullable=false)
	private String eventoId;
	
	@Column(name="data_evento", nullable=false)
	private Date dataEvento;
	
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="usuario_id")
	private Usuarios usuario;
	
	@Column(name="autor_id", nullable=false)
	private String autorId;
	
	@Column(name="assunto_evento", nullable=false)
	private String assuntoEvento;
	

}
